# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1153.67.10 -> 1.1153.67.11 # arch/ia64/Makefile 1.59 -> 1.60 # arch/ia64/kernel/time.c 1.31 -> 1.32 # include/asm-ia64/hw_irq.h 1.9 -> 1.10 # include/asm-ia64/ptrace.h 1.15 -> 1.16 # arch/ia64/Kconfig 1.38.1.1 -> 1.38.1.2 # (new) -> 1.1 arch/ia64/oprofile/init.c # (new) -> 1.1 arch/ia64/oprofile/Makefile # (new) -> 1.1 arch/ia64/oprofile/Kconfig # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/08/26 romieu@fr.zoreil.com 1.1153.69.15 # [netdrvr sis190] remove unneeded alignment code, other small fixes # # Driver does not need to enforce 256 byte alignment for data returned # from pci_alloc_consistent(). # - {rx/tx}_dma_aligned and {rx/td}_dma_raw are both replaced by {rx/tx}_dma; # - {rx/tx}_desc_raw is replaced by direct use of {Rx/Tx}DescArray; # - SiS190_open() # + fixup for a lack of kmalloc() failure handling; # + (return status) there is no need for both retval/rc: merge them; # + anonymous printk() fixup: the name of the guilty device is printed; # - define {RX/TX}_DESC_TOTAL_SIZE because I am too lazy to read twice the # same lengthy arithmetic expression. # # # -------------------------------------------- # 03/08/26 jejb@raven.il.steeleye.com 1.1153.64.24 # Fix typo introduced into 53c700 by tag fixup patch # -------------------------------------------- # 03/08/26 jejb@raven.il.steeleye.com 1.1153.64.25 # Add extern for scsi_logging_level so scsi_sysctl.c can compile # -------------------------------------------- # 03/08/26 srompf@isg.de 1.1153.69.16 # [netdrvr 8139too] use mii_check_media lib function, # instead of homebrew MII bitbanging. # -------------------------------------------- # 03/08/26 hirofumi@mail.parknet.co.jp 1.1153.69.17 # [netdrvr 8139too] lwake unlock fix # -------------------------------------------- # 03/08/26 hirofumi@mail.parknet.co.jp 1.1153.69.18 # [netdrvr 8139too] remove unused RxConfigMask # -------------------------------------------- # 03/08/26 hirofumi@mail.parknet.co.jp 1.1153.69.19 # [netdrvr 8139too] add more h/w revision ids # -------------------------------------------- # 03/08/26 greg@kroah.com 1.1153.69.20 # [netdrvr sis900] don't call pci_find_device from irq context # # I realized that I've had this patch in my tree for a while, and forgot # to send it to you and lkml. The patch below fixes bug number 923: # http://bugme.osdl.org/show_bug.cgi?id=923 # (basically keeps us from calling pci_find_device from interrupt # context.) # # It's been tested by a few people with this device, and they say it works # just fine for them. Please forward it on up the food chain. # -------------------------------------------- # 03/08/26 javier@tudela.mad.ttd.net 1.1153.69.21 # [wireless airo] add support for MIC and latest firmwares # -------------------------------------------- # 03/08/26 jgarzik@redhat.com 1.1153.69.22 # [netdrvr sis190] small bug fixes # # * call pci_set_dma_mask # * remove erroneous call to unregister_netdev in _init_board() # -------------------------------------------- # 03/08/27 stevef@smfhome2.austin.rr.com 1.1153.70.1 # Fix scheduling while atomic problem in getting attributes of newly created file. Fix truncate of existing file when O_CREAT but not O_TRUNC specified. # -------------------------------------------- # 03/08/27 davidm@tiger.hpl.hp.com 1.1153.65.6 # Merge tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5 # into tiger.hpl.hp.com:/data1/bk/lia64/linux-ia64-2.5 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.17 # [PATCH] USB: CREDITS file update # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.18 # [PATCH] Audit and minor cleanups in drivers/usb/* # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.19 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - audit video_register_device # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.20 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.21 # [PATCH] Audit and minor cleanups in drivers/usb/* # # Changes # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.22 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # - static declarations for module_init/cleanup functions # - adding missing __init/__exit for module_init/cleanup functions # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.23 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.24 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.25 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # - module_init/cleanup functions declared as static # - missing __init/__exit # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.26 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.27 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.28 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # - static declarations for module_init/cleanup functions # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.29 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.30 # [PATCH] Audit and minor cleanups in drivers/usb/* # # - if usb_register fails report back its return code rather than 0 # -------------------------------------------- # 03/08/27 greg@kroah.com 1.1153.32.31 # [PATCH] USB: fix compiler warning in mdc800 driver # -------------------------------------------- # 03/08/27 davej@redhat.com 1.1153.1.126 # [AGPGART] Update VIA PCI IDs. # - Add some new IDs # - Rename some older ones. # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.32 # [PATCH] ...more usb audit # # - audit hiddev_init in hid_init # - audit usb_register in hid_init # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.33 # [PATCH] ...more usb audit # # - audit usb_register in hiddev_init # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.34 # [PATCH] Another bad usb_register audit: dvb-ttusb-budget # # - if usb_register failes report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.35 # [PATCH] Another bad audit in drivers/usb/*: usblp # # Another better audit: # - If usb_register failes report back its return value # rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.36 # [PATCH] Another bad audit in drivers/usb/*: cdc-acm # # Changes: # - if tty_register_driver report back its return code rather than -1 # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.37 # [PATCH] Another bad audit in drivers/usb/*: usbskeleton # # Another minor cleanup: # - if usb_register fails report back its return code rather than -1 # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.38 # [PATCH] Audit and minor cleanups in usbnet # -------------------------------------------- # 03/08/27 bellucda@tiscali.it 1.1153.32.39 # [PATCH] Audit and minor cleanups in usbstorage # -------------------------------------------- # 03/08/27 greg@kroah.com 1.1153.32.40 # [PATCH] USB: fix up a bunch of copyrights that were incorrectly declared. # # It needs to be "Copyright (C)" not "Copyright (c)" according to the lawyers # who know these things... # -------------------------------------------- # 03/08/27 rmk@flint.arm.linux.org.uk 1.1153.61.4 # [PCMCIA] Add generic and per-controller power management handling. # # Add per-quirk power management to aid saving/restoring controller # specific state. Also, add proper pci state saving/restoring. # Note that Cardbus bridges have to save and restore at least 0x48 # bytes of configuration space, not 0x40. # # This replaces the rather muddy save state in early initialisation, # restore it on socket init stuff that we previously had. # -------------------------------------------- # 03/08/27 rmk@flint.arm.linux.org.uk 1.1153.61.5 # [PCMCIA] Move PM restore from socket initialisation. # # There is less reason for socket initialisation to vary between # controller types now. In fact, we could very well get rid of # much of the TI-specific socket initialisation quirk handling, # since TI realised that they should be more compatible with other # implementations in later versions of their bridges. # -------------------------------------------- # 03/08/27 rmk@flint.arm.linux.org.uk 1.1153.61.6 # [PCMCIA] Put socket initialisation to where it should be. # # Move re-initialisation from the socket init/resume paths to where it # belongs - the main initialisation path. # -------------------------------------------- # 03/08/27 rmk@flint.arm.linux.org.uk 1.1153.61.7 # [PCMCIA] Move more controllers to the more advanced quirks. # # Now that we clearly know what each quirk type is doing, we can think # about switching some devices to different quirks. # # Looking at the various data sheets for these devices, many of them # support the MBURSTUP bit, so we can move these to the quirk which # supports setting this bit. # -------------------------------------------- # 03/08/27 daniel.ritz@ch.rmk.(none) 1.1153.61.8 # [PCMCIA] Add ToPIC97 and ToPIC100 support. # # Patch from Daniel Ritz. # # Add zoom video support for tosiba ToPIC97 and ToPIC100 chips. # -------------------------------------------- # 03/08/27 rmk@flint.arm.linux.org.uk 1.1153.61.9 # [PCMCIA] Don't add CIS cache entries on failure. # # If we fail to map the CIS space, don't pollute the CIS cache with # invalid data. # -------------------------------------------- # 03/08/27 willy@debian.org 1.1153.69.23 # [ethtool] fix ethtool_get_strings counting bug # -------------------------------------------- # 03/08/27 vinay-rc@naturesoft.net 1.1153.32.41 # [PATCH] USB: digi_acceleport.c: typo fix # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.42 # [PATCH] USB: Add Kconfig option for building ax8817x support in usbnet # # David T Hollis wrote: # > This patch adds support to Kconfig to build ax8817x support into # > usbnet. This renames the config option for the existing standalone # > ax8817x driver to CONFIG_USB_AX8817X_STANDALONE. # # Please merge this version instead. It includes all of David's # patch, plus it makes the descriptive info match the updated # role of this driver. So given this, only the webpage still # needs updates; the in-tree docs are now consistent. # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.43 # [PATCH] USB: usb_new_device() shouldn't be exported # # Minor cleanup. This call no longer needs exporting for root hubs, # they have their own API to use instead. # -------------------------------------------- # 03/08/27 sri@us.ibm.com 1.1153.68.2 # [SCTP] SCTP_SET_PEER_PRIMARY socket option support. (Kevin Gao) # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.44 # [PATCH] USB: minor doc updates # # Small kerneldoc clarifications: # # - more endpoint halt clearing info: # * some hardware can't do it; which causes problems with drivers # that want to use multiple interfaces or altsettings. # * it doesn't affect queuing of data (should help usb-storage # gadget driver, plus it's more sensible this way); # - disconnect() callback not guaranteed: some hardware can't tell # # Mostly this captures answers to questions I've been asked. # -------------------------------------------- # 03/08/27 willy@debian.org 1.1153.69.24 # [netdrvr 8139too] ethtool_ops support # -------------------------------------------- # 03/08/27 olh@suse.de 1.1153.32.45 # [PATCH] USB: io_edgeport.o differences in 2.4 vs. 2.6 # # On Fri, Aug 22, Greg KH wrote: # > On Sat, Aug 16, 2003 at 01:41:01PM +0200, Olaf Hering wrote: # > > # > > I sent you a patch for 2.4 once to make that FOO_MSR_RI, it seems that # > > was not applied to 2.6 # > Care to send me a patch for 2.6 then? # # How about that one: # -------------------------------------------- # 03/08/27 romieu@fr.zoreil.com 1.1153.69.25 # [netdrvr sis190] use PCI DMA API for RX buffers # # Missing pieces for DMA-API on the Rx side: # - SiS190_init_ring: the global area for the received data is mapped. # This area is persistent during the whole driver's life. # It only needs to be unmapped in SiS190_close() as no other exit/error # path exists. # - SiS190_rx_interrupt: no map/unmap for received data buffer. A single # sync operation is done. Btw, there is no need to store the same value # in RxDescArray[cur_rx].buf_addr over and over again. # - Remove driver dependancy on CONFIG_BROKEN. # -------------------------------------------- # 03/08/27 m@mbsks.franken.de 1.1153.32.46 # [PATCH] USB: Cyberjack patch # # Mahlzeit # # I attached you the diff for 2.6.0-test4. It does there also one program run # without any error, but not more. I hope this issue will be resolved soon, # but I do not know yet how. # -------------------------------------------- # 03/08/27 maloi@phota.to 1.1153.32.47 # [PATCH] USB: Aten 4 Port USB 2.0 KVM C (ACS-1724) # -------------------------------------------- # 03/08/27 greg@kroah.com 1.1153.32.48 # [PATCH] USB: hook up the USB driver core to the power management calls of the driver model. # # Now it's up to the individual USB drivers to implement suspend() and # resume() if they want to. # -------------------------------------------- # 03/08/27 greg@kroah.com 1.1153.32.49 # [PATCH] USB: rip out old proc code from the usbvideo driver. # # This removes the compiler warning from this driver. # -------------------------------------------- # 03/08/27 greg@kroah.com 1.1153.32.50 # [PATCH] USB: removed the proc code from the se401.c driver # # This removes the compiler warning. # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.51 # [PATCH] USB: usbnet minor cleanup # # This goes on top of Dave Hollis' patch, and makes the front matter # match the slightly revised role -- and mention that new support. # It also eliminates a potentially confusing name and corrects an # omission (Zaurus framing wasn't printed). # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.52 # [PATCH] USB: net2280 fixes: ep halt, sysfs # # Small updates: # # - don't try chiprev 0100 erratum 0114 workaround on # newer chips; and (mostly) revert it when clearing # endpoint halt feature. (bugfix) # # - add missing define for the "force crc error" bit; # I guess those #defines were generated from old chip # specs! potentially useful with test software. # # - sysfs register dump includes chiprev and decodes some # of the more interesting endpoint response bits. # # - makes a sysfs "gadget" node, representing the gadget # itself. (decided against the class_device or bus_type # approaches, until their value outweighs their costs.) # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.53 # [PATCH] USB: usbnet, cdc ethernet descriptor parsing fixes # # This makes the new CDC Ethernet code handle more devices: # # - Uses the active config, not just the default one, if it's # coping "descriptors in wrong place" quirk. (bugfix) # # - Uses usb_ifnum_to_if() to get interfaces. (bugfix) # # - AMBIT USB cable modems have bogus CDC Union descriptors; # workaround by switching master and slave. (add quirk) # # - To make it easier the next time we run into firmware # that violates the class spec, add debug messages saying # exactly why it's giving up on a given CDC device. # # Net result, this code now handles at least one more # cable modem design. # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.54 # [PATCH] USB: ohci -- reset, fault recovery # # This fixes two small and unrelated bugs in the current OHCI code: # # - Certain initialization sequences had problems with IRQs. # Fixed last month in EHCI, but this ohci patch didn't seem # needed back then. OK, so now I saw the same bug in OHCI. # (I could believe UHCI needs it too, sigh.) # # - When restarting endpoint i/o after a queue fault, the HC # needs to be told the control (or bulk) list filled (CLF/BLF). # Likely this wasn't common (usbtest test10 subcase7 fault # recovery reproduced it nicely). # # Please merge. Lack of the first one might make trouble for # some people. # -------------------------------------------- # 03/08/27 david-b@pacbell.net 1.1153.32.55 # [PATCH] USB: uhci-hcd, add uhci_reset() # # This is a straightforward change matching ones sent in # for ehci (last month) and ohci (earlier this week). # # It abstracts the reset operation into something that's # called before the pci glue does much to the hardware. # # It also arranges to kick the BIOS off the hardware before # it resets it (not after) ... so there's no confusion at # any time about what driver "owns" that hardware. (Again # matching what ehci and ohci drivers do.) # -------------------------------------------- # 03/08/27 chas@cmf.nrl.navy.mil 1.1153.59.28 # [ATM]: Clean up the code making use of sti/cli (from vinay-rc@naturesoft.net) # -------------------------------------------- # 03/08/27 chas@cmf.nrl.navy.mil 1.1153.59.29 # [ATM]: In ambassador driver, use del_timer_sync instead. # -------------------------------------------- # 03/08/27 set@pobox.com 1.1153.59.30 # [NET]: Fix probing messages in 3c509.c # # Currently, 3c509.c prints this on detection: # eth%d: 3c5x9 at 0x280, BNC port, address 00 20 af 2f d4 81, IRQ 5. # ^^ # -------------------------------------------- # 03/08/27 jgarzik@redhat.com 1.1153.33.62 # [TG3]: Remove pci-set-dma-mask casts. # -------------------------------------------- # 03/08/27 yoshfuji@linux-ipv6.org 1.1153.59.31 # [NET]: Fix OOPS in multicast procfs usage. # # Fix several refcntmistakes in seq_file handlers for # /proc/net/{igmp,igmp6,msfilter,msfilter6} # -------------------------------------------- # 03/08/27 bunk@fs.tum.de 1.1153.59.32 # [NET]: Fix bpqether build with procfs disabled. # -------------------------------------------- # 03/08/27 davem@nuts.ninka.net 1.1153.58.3 # [SPARC]: Add missing timer_create syscall entries. # -------------------------------------------- # 03/08/27 jakub@redhat.com 1.1153.58.4 # [COMPAT]: Add missing set_fs() calls to {clock,timer}_*() handlers. # -------------------------------------------- # 03/08/28 krishnakumar@naturesoft.net 1.1153.59.33 # [IPV4]: Fix creat_proc_read_entry() args. # -------------------------------------------- # 03/08/28 rob@osinvestor.com 1.1153.58.5 # [SPARC]: Two build fixes. # -------------------------------------------- # 03/08/28 xose@wanadoo.es 1.1153.33.63 # [TG3]: More missing PCI ids. # -------------------------------------------- # 03/08/28 zaitcev@redhat.com 1.1153.58.6 # [SPARC]: Add pci_{map,unmap}_page(). # -------------------------------------------- # 03/08/28 rddunlap@osdl.org 1.1153.59.34 # [SCTP]: Fix printf format string. # -------------------------------------------- # 03/08/28 rddunlap@osdl.org 1.1153.59.35 # [IPVS]: Fix printf format strings. # -------------------------------------------- # 03/08/28 rddunlap@osdl.org 1.1153.59.36 # [HAMRADIO]: Missing return statement in yam.c driver. # -------------------------------------------- # 03/08/28 jakub@redhat.com 1.1153.58.7 # [SPARC64]: Fix struct sigevent32. # -------------------------------------------- # 03/08/28 jakub@redhat.com 1.1153.58.8 # [SPARC64]: sys_timer_create needs 32-bit translation. # -------------------------------------------- # 03/08/28 jakub@redhat.com 1.1153.58.9 # [SPARC]: Fix typos. # -------------------------------------------- # 03/08/28 greg@kroah.com 1.1153.32.56 # Merge gregkh@kernel.bkbits.net:linux/linus-2.6 # into kroah.com:/home/greg/linux/BK/gregkh-2.6 # -------------------------------------------- # 03/08/28 stern@rowland.harvard.edu 1.1153.32.57 # [PATCH] USB: Another unusual_devs.h entry update # # This information was provided by Anthony Arkles . # Please apply to both 2.4 and 2.6. # -------------------------------------------- # 03/08/28 david-b@pacbell.net 1.1153.32.58 # [PATCH] USB: net2280, patch dma chains # # One person working on a mass-storage driver (the usb protocol # side, not the block subsystem side) ran into a bug in how a # bit of net2280 dma automagic was handled. # # This patch fixes it by calling existing dma chain patchup # code when the dma engine was forced to "hiccup" by having # a not-yet-valid entry in it. The hiccup is needed in this # case since the IN data stage mustn't terminate with a # short transfer (zero length packet); but the status stage # is always a short packet. The "terminate with short packet" # bit is endpoint state, not request state, so IN dma queues # sometimes need this kind of fixup. # -------------------------------------------- # 03/08/28 rddunlap@osdl.org 1.1153.32.59 # [PATCH] USB: fix printk parameter types # -------------------------------------------- # 03/08/28 rddunlap@osdl.org 1.1153.32.60 # [PATCH] USB: fix functions to match prototypes # -------------------------------------------- # 03/08/28 greg@kroah.com 1.1153.32.61 # [PATCH] USB: add support for 2 new devices to the visor driver. # # Based on the 2.4 version of the driver. # -------------------------------------------- # 03/08/28 rusty@rustcorp.com.au 1.1153.65.7 # [PATCH] Fix Slowdown in /proc/kallsyms # # Out by one error broke caching of results in /proc/kallsyms, slowing # reading to a crawl. # -------------------------------------------- # 03/08/29 davej@redhat.com 1.1153.1.127 # [AGPGART] Numerous AMD64 gart driver cleanups. # From Andi Kleen. # # - Fix the help text for the 8151 driver # - Fix the dependencies (must be compiled in when the IOMMU is in) # - Add __setup options for when the AGP driver is compiled in: # agp=off agp=try_unsupported # Currently only supported for the K8 driver, the other drivers # would need fixes in their module init functions too. # - Add try_unsupported support for the K8 driver. # - Add some aperture sanity checking to the K8 driver. # There are unfortunately still BIOS around that get it wrong. # - Also try to read the aperture from the AGP bridge if it is bogus # in the Northbridge. Windows only looks into the bridge and some BIOS only # put the aperture there. # [These two changes are only useful for 32bit kernels. The 64bit kernel # checks this in aperture.c anyways, and fixes it. The 32bit kernel # cannot fix a complety broken aperture currently, but at least it will # not crash now] # - Clean up handling for multiple northbridges. The paths are the same # now for as for a single NB. # - Some other minor cleanups. # -------------------------------------------- # 03/08/28 wcohen@redhat.com 1.1153.67.11 # [PATCH] ia64: oprofile support # # I have revised the oprofile patch for ia64 to provide just the basic # timer interrupt mechanism to avoid interferring with the perfmon 2.0 # support. I have verified the oprofile ia64 patch applies cleanly and # build a working kernel with the 2.6.0-test4 kernel and the # linux-2.6.0-test4-ia64-030826.diff.bz2 patch. # # More work is required to get oprofile to work with the perfmon 2.0. # However, the patch as it is currently implements should not cause # problems for the perfom 2.0 support. # -------------------------------------------- # diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig --- a/arch/ia64/Kconfig Tue Sep 9 01:05:53 2003 +++ b/arch/ia64/Kconfig Tue Sep 9 01:05:53 2003 @@ -589,6 +589,7 @@ source "arch/ia64/hp/sim/Kconfig" +source "arch/ia64/oprofile/Kconfig" menu "Kernel hacking" diff -Nru a/arch/ia64/Makefile b/arch/ia64/Makefile --- a/arch/ia64/Makefile Tue Sep 9 01:05:53 2003 +++ b/arch/ia64/Makefile Tue Sep 9 01:05:53 2003 @@ -65,6 +65,7 @@ drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ +drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ boot := arch/ia64/hp/sim/boot diff -Nru a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c --- a/arch/ia64/kernel/time.c Tue Sep 9 01:05:53 2003 +++ b/arch/ia64/kernel/time.c Tue Sep 9 01:05:53 2003 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -39,29 +40,6 @@ #endif static void -do_profile (unsigned long ip) -{ - extern cpumask_t prof_cpu_mask; - - if (!prof_buffer) - return; - - if (!cpu_isset(smp_processor_id(), prof_cpu_mask)) - return; - - ip -= (unsigned long) _stext; - ip >>= prof_shift; - /* - * Don't ignore out-of-bounds IP values silently, put them into the last - * histogram slot, so if present, they will show up as a sharp peak. - */ - if (ip > prof_len - 1) - ip = prof_len - 1; - - atomic_inc((atomic_t *) &prof_buffer[ip]); -} - -static void itc_reset (void) { } @@ -199,6 +177,52 @@ tv->tv_usec = usec; } +/* + * The profiling function is SMP safe. (nothing can mess + * around with "current", and the profiling counters are + * updated with atomic operations). This is especially + * useful with a profiling multiplier != 1 + */ +static inline void +ia64_do_profile (struct pt_regs * regs) +{ + unsigned long ip, slot; + extern unsigned long prof_cpu_mask; + + profile_hook(regs); + + if (user_mode(regs)) + return; + + if (!prof_buffer) + return; + + ip = instruction_pointer(regs); + /* Conserve space in histogram by encoding slot bits in address + * bits 2 and 3 rather than bits 0 and 1. + */ + slot = ip & 3; + ip = (ip & ~3UL) + 4*slot; + + /* + * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. + * (default is all CPUs.) + */ + if (!cpu_isset(smp_processor_id(), prof_cpu_mask)) + return; + + ip -= (unsigned long) &_stext; + ip >>= prof_shift; + /* + * Don't ignore out-of-bounds IP values silently, + * put them into the last histogram slot, so if + * present, they will show up as a sharp peak. + */ + if (ip > prof_len-1) + ip = prof_len-1; + atomic_inc((atomic_t *)&prof_buffer[ip]); +} + static irqreturn_t timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) { @@ -210,14 +234,9 @@ printk(KERN_ERR "Oops: timer tick before it's due (itc=%lx,itm=%lx)\n", ia64_get_itc(), new_itm); + ia64_do_profile(regs); + while (1) { - /* - * Do kernel PC profiling here. We multiply the instruction number by - * four so that we can use a prof_shift of 2 to get instruction-level - * instead of just bundle-level accuracy. - */ - if (!user_mode(regs)) - do_profile(regs->cr_iip + 4*ia64_psr(regs)->ri); #ifdef CONFIG_SMP smp_do_timer(regs); diff -Nru a/arch/ia64/oprofile/Kconfig b/arch/ia64/oprofile/Kconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/oprofile/Kconfig Tue Sep 9 01:05:53 2003 @@ -0,0 +1,22 @@ + +menu "Profiling support" + depends on EXPERIMENTAL + +config PROFILING + bool "Profiling support (EXPERIMENTAL)" + help + Say Y here to enable the extended profiling support mechanisms used + by profilers such as OProfile. + +config OPROFILE + tristate "OProfile system profiling (EXPERIMENTAL)" + depends on PROFILING + help + OProfile is a profiling system capable of profiling the + whole system, include the kernel, kernel modules, libraries, + and applications. + + If unsure, say N. + +endmenu + diff -Nru a/arch/ia64/oprofile/Makefile b/arch/ia64/oprofile/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/oprofile/Makefile Tue Sep 9 01:05:53 2003 @@ -0,0 +1,9 @@ +obj-$(CONFIG_OPROFILE) += oprofile.o + +DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \ + oprof.o cpu_buffer.o buffer_sync.o \ + event_buffer.o oprofile_files.o \ + oprofilefs.o oprofile_stats.o \ + timer_int.o ) + +oprofile-y := $(DRIVER_OBJS) init.o diff -Nru a/arch/ia64/oprofile/init.c b/arch/ia64/oprofile/init.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/oprofile/init.c Tue Sep 9 01:05:53 2003 @@ -0,0 +1,25 @@ +/** + * @file init.c + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author John Levon + */ + +#include +#include +#include +#include + +extern void timer_init(struct oprofile_operations ** ops); + +int __init oprofile_arch_init(struct oprofile_operations ** ops) +{ + return -ENODEV; +} + + +void oprofile_arch_exit(void) +{ +} diff -Nru a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h --- a/include/asm-ia64/hw_irq.h Tue Sep 9 01:05:53 2003 +++ b/include/asm-ia64/hw_irq.h Tue Sep 9 01:05:53 2003 @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff -Nru a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h --- a/include/asm-ia64/ptrace.h Tue Sep 9 01:05:53 2003 +++ b/include/asm-ia64/ptrace.h Tue Sep 9 01:05:53 2003 @@ -223,6 +223,12 @@ }; #ifdef __KERNEL__ +/* + * We use the ia64_psr(regs)->ri to determine which of the three + * instructions in bundle (16 bytes) took the sample. Generate + * the canonical representation by adding to instruction pointer. + */ +# define instruction_pointer(regs) ((regs)->cr_iip + ia64_psr(regs)->ri) /* given a pointer to a task_struct, return the user's pt_regs */ # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr)